<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>把json格式字符串转换成json对象</title>
    <script type="text/javascript">
        //json格式字符串
        var jsonString='{"name":"tzlan","age":15,"key01":[1,3,5,6],"key02":{"key11":1,"key12":2}}';
        //把json格式字符串转换成json对象    eval('(json格式字符串)')
        var jsonObject=eval('('+jsonString+')');
        console.log(jsonObject.name);
        console.log(jsonObject.age);
        console.log(jsonObject.key01);
        console.log(jsonObject.key02.key11);
    </script>
</head>
<body>

</body>
</html>